{layout name="layout/default" /}
<div class="panel panel-default panel-intro">
  <div class="panel-heading">
    <div class="panel-lead"><em>{$nav_title.title}</em>{$nav_title.remark}</div>
  </div>
  <div class="panel-body" id="contents">
    <div id="myTabContent" class="tab-content">
      <div class="tab-pane fade active in">
        <div class="widget-body no-padding">
          <div class="bootstrap-table">
  <div class="commonsearch-table hidden">
<form class="form-inline form-commonsearch nice-validator n-default" method="post" action="" role="form">
<div class="form-group" style="padding:0 10px 0 0px;position: relative;"><label for="createtime" class="control-label" style="padding:0 10px">关键词搜索</label><input class="form-control" placeholder="节目名" type="text" name="wd">
</div>
                
                <div class="form-group" style="margin:5px">
                  <div class="col-sm-12 text-center">
                    <button type="submit" class="btn btn-success ajax-posturl" target-form="form-commonsearch">提交</button>
                    <button type="reset" class="btn btn-default">重置</button>
                  </div>
                </div>
              </form>
            </div>            
            <div class="fixed-table-toolbar">
              <div class="columns-right pull-right" style="margin-top:10px;">
                <a href="javascript:;" class="btn  btn-default hidedsearch" title="普通搜索"><i class="glyphicon glyphicon-search"></i> </a>
              </div>
               <div class="pull-right search">
    <select name="cid" class="form-control" type="get-select" style="margin:0 0 0 10px;">
   <option value="{:admin_url('admin/tv/index',array('stars'=>$stars,'status'=>$status,'wd'=>$wd,'type'=>$type,'order'=>$order))}">分类筛选</option>
{volist name="listtv" id="vo"}<option value="{:admin_url('admin/tv/index',array('cid'=>$vo.list_id,'stars'=>$stars,'status'=>$status,'wd'=>$wd,'type'=>$type,'order'=>$order))}" {eq name="vo.list_id" value="$cid"}selected{/eq}>{$vo.list_name}</option>
{if isset($vo['son'])}{volist name="vo['son']" id="splist"}<option value="{:admin_url('admin/tv/index',array('cid'=>$splist.list_id,'stars'=>$stars,'status'=>$status,'wd'=>$wd,'type'=>$type,'order'=>$order))}" {eq name="splist.list_id" value="$cid"}selected{/eq}>├ {$splist.list_name}</option>{/volist}{/if}
{/volist}
</select>
              </div>             
              <div class="pull-right search">
                <select name="status" class="form-control" type="get-select" style="margin:0 0 0 10px;border-right:none">
                  <option value="{:admin_url('admin/tv/index',array('cid'=>$cid,'stars'=>$stars,'wd'=>$wd,'type'=>$type,'order'=>$order))}">状态筛选</option>
                  <option value="{:admin_url('admin/tv/index',array('cid'=>$cid,'stars'=>$stars,'status'=>1,'wd'=>$wd,'type'=>$type,'order'=>$order))}" {eq name="status" value="1"}selected{/eq}>
                  显示
                  </option>
                  <option value="{:admin_url('admin/tv/index',array('cid'=>$cid,'stars'=>$stars,'status'=>2,'wd'=>$wd,'type'=>$type,'order'=>$order))}" {eq name="status" value="2"}selected{/eq}>
                  隐藏
                  </option>
                </select>
              </div>
              <div class="bs-bars pull-left">
                <div id="toolbar" class="toolbar pull-left"><a href="{:admin_url('admin/tv/index')}" class="btn btn-primary ajax-url"><i class="fa fa-refresh"></i> </a> <a href="{:admin_url('admin/tv/add')}" data-name="添加专题" data-url="{:admin_url('admin/tv/add')}" class="btn btn-success btn-add"><i class="fa fa-plus"></i> 添加</a> <a  url="{:admin_url('admin/tv/status',array('status'=>1))}" target-form="ids" class="confirm btn btn-info btn-disabled ajax-post disabled"><i class="fa fa-unlock"></i> 显示</a> <a  url="{:admin_url('admin/tv/status',array('status'=>0))}" target-form="ids" class="confirm btn btn-warning btn-disabled ajax-post disabled"><i class="fa fa-lock"></i> 隐藏</a> <a  url="{:admin_url('admin/tv/del')}" target-form="ids" class="confirm btn btn-danger btn-del btn-disabled ajax-post disabled"><i class="fa fa-trash"></i> 删除</a> <a  url="{:admin_url('admin/tv/del')}" target-form="ids" class="confirm btn bg-purple btn-disabled disabled btn-move"><i class="fa fa-life-ring"></i> 移动</a> </div><span style="display:none" class="move-cid ids"><select name="pestcid" class="form-control" style="float:left; width:auto; padding:0 10px 0 10px;margin:3px 10px 0 10px;"><option value="">选择分类</option>{volist name="listtv" id="vo"}<option value="{$vo.list_id}" {eq name="vo.list_id" value="$cid"}selected{/eq}>{$vo.list_name}</option>
{if isset($vo['son'])}{volist name="vo['son']" id="splist"}<option value="{$splist.list_id}" {eq name="splist.list_id" value="$cid"}selected{/eq}>├ {$splist.list_name}</option>{/volist}{/if}
{/volist}</select><a url="{:admin_url('admin/tv/pestcid')}" target-form="ids,pestcid" class="confirm btn bg-olive btn-disabled disabled ajax-post"> 确 认</a></span><span id="selectedChks" style="display:none; margin-left:10px;">已选择<strong></strong>记录</span> </div>
              </div>
            </div>
          </div>
          <div class="fixed-table-container" style="padding-bottom: 0px;">
            <div class="fixed-table-body">
              <form class="ids">
                <table id="table" class="table table-striped table-bordered table-hover" style="margin-top: 0px;" width="100%">
                  <thead>
                    <tr style="height:45px;">
                      <th class="bs-checkbox "><input name="btSelectAll" type="checkbox"></th>
                      <th style="text-align:center;vertical-align: middle;">{eq name="orders" value="tv_id desc"}<a href="{:admin_url('admin/tv/index',array('cid'=>$cid,'stars'=>$stars,'status'=>$status,'wd'=>$wd,'type'=>'tv_id','order'=>'asc'))}" class="btn-link sort ajax-url">编号 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:admin_url('admin/tv/index',array('cid'=>$cid,'stars'=>$stars,'status'=>$status,'wd'=>$wd,'type'=>'tv_id','order'=>'desc'))}" class="btn-link sort ajax-url">编号 <i class="fa fa-angle-down"></i></a>{/eq}</th>
                      <th style="text-align:center;vertical-align: middle;">节目分类</th>
                      <th style="text-align:left;vertical-align: middle;">节目名称</th>
                      <th style="text-align:center;vertical-align: middle;">接口API</th>
                      <th style="text-align:center;vertical-align: middle;">接口类型</th>
                      <th style="text-align:center;vertical-align: middle;">{eq name="orders" value="tv_hits desc"}<a href="{:admin_url('admin/tv/index',array('cid'=>$cid,'stars'=>$stars,'status'=>$status,'wd'=>$wd,'type'=>'tv_hits','order'=>'asc'))}" class="btn-link sort ajax-url">节目人气 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:admin_url('admin/tv/index',array('cid'=>$cid,'stars'=>$stars,'status'=>$status,'wd'=>$wd,'type'=>'tv_hits','order'=>'desc'))}" class="btn-link sort ajax-url">节目人气 <i class="fa fa-angle-down"></i></a>{/eq}</th>                      
<th style="text-align:center;vertical-align: middle;">{eq name="orders" value="tv_stars desc"}<a href="{:admin_url('admin/tv/index',array('cid'=>$cid,'stars'=>$stars,'status'=>$status,'wd'=>$wd,'type'=>'tv_stars','order'=>'asc'))}" class="btn-link sort ajax-url">节目星级 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:admin_url('admin/tv/index',array('cid'=>$cid,'stars'=>$stars,'status'=>$status,'wd'=>$wd,'type'=>'tv_stars','order'=>'desc'))}" class="btn-link sort ajax-url">节目星级 <i class="fa fa-angle-down"></i></a>{/eq}</th>
                      <th style="text-align:center;vertical-align: middle;">{eq name="orders" value="tv_addtime desc"}<a href="{:admin_url('admin/tv/index',array('cid'=>$cid,'stars'=>$stars,'status'=>$status,'wd'=>$wd,'type'=>'tv_addtime','order'=>'asc'))}" class="btn-link sort ajax-url">更新时间 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:admin_url('admin/tv/index',array('cid'=>$cid,'stars'=>$stars,'status'=>$status,'wd'=>$wd,'type'=>'tv_addtime','order'=>'desc'))}" class="btn-link sort ajax-url">更新时间 <i class="fa fa-angle-down"></i></a>{/eq}</th>
                      <th style="text-align:center;vertical-align: middle;">节目状态</th>
                      <th style="text-align:center;vertical-align: middle;">相关操作</th>
                    </tr>
                  </thead>
            <tbody>
                  {notempty name="list"}
                  {volist name="list" id="vo"}
                <tr>
                <td class="bs-checkbox"><input data-index="{$vo['tv_id']}" name="id[]" type="checkbox"  value="{$vo['tv_id']}"></td>
                <td style="text-align:center;vertical-align: middle;"><a href="{:zanpian_data_url('home/tv/read',array('id'=>$vo['tv_id'],'pinyin'=>$vo['tv_letters'],'cid'=>$vo['tv_cid'],'dir'=>getlistname($vo['tv_cid'],'list_dir')))}" target="_blank" class="btn-link">{$vo.tv_id}</a></td>
                <td style="text-align:center;vertical-align: middle;"><a href="{:admin_url('admin/tv/index',array('cid'=>$vo['tv_cid'],'stars'=>$stars,'status'=>$status,'wd'=>$wd,'type'=>$type,'order'=>$order))}" class="btn-link ajax-url">{:getlistname($vo['tv_cid'])}</a></td>
                <td style="text-align:left;vertical-align: middle;"><a href="javascript:;" class="editable editable-click btn-link" data-id="{$vo['tv_id']}" data-name="tv_name" data-type="text" data-pk="{$vo['tv_id']}" data-url="{:admin_url('admin/tv/editable')}">{$vo.tv_name}</a></td>
                
                <td style="text-align:center;vertical-align: middle;"><a href="javascript:;" class="editable editable-click btn-link" data-id="{$vo['tv_id']}" data-name="tv_apiid" data-type="text" data-pk="{$vo['tv_id']}" data-url="{:admin_url('admin/tv/editable')}">{$vo.tv_apiid}</a></td>
                <td style="text-align:center;vertical-align: middle;"><a href="javascript:;" class="editable editable-click btn-link" data-id="{$vo['tv_id']}" data-name="tv_apitype" data-type="text" data-pk="{$vo['tv_id']}" data-url="{:admin_url('admin/tv/editable')}">{$vo.tv_apitype}</a></td>
                 <td style="text-align:center;vertical-align: middle;"><a href="javascript:;" class="editable editable-click btn-link" data-id="{$vo['tv_id']}" data-name="tv_hits" data-type="text" data-pk="{$vo['tv_id']}" data-url="{:admin_url('admin/tv/editable')}">{$vo.tv_hits}</a></td> 
                 <td style="text-align:center;vertical-align: middle;">{volist name=":admin_star_arr($vo.tv_stars)" id="ajaxstar"}<img src="{$config.site.cdnurl}admin/zanpiancms/img/star{$ajaxstar}.gif"  id="tv_{$vo.tv_id}_{$i}" class="setstars">{/volist}</td>
                 <td style="text-align:center;vertical-align: middle;">{$vo.tv_addtime|date='Y-m-d H:i:s',###}</td>               
                <td style="text-align:center;vertical-align: middle;">	
                {eq name="vo.tv_status" value="1"} <a class="btn btn-info btn-xs btn-success ajax-get" url="{:admin_url('admin/tv/status',array('id'=> $vo['tv_id'],'status'=>0))}">显示</a>{else /}<a class="btn btn-info btn-xs btn-danger ajax-get" url="{:admin_url('admin/tv/status',array('id'=> $vo['tv_id'],'status'=>1))}">隐藏</a>{/eq}
               </td>
                <td style="text-align:center;vertical-align: middle;">
                <a href="{:admin_url('admin/tv/edit',array('id'=> $vo['tv_id']))}"  class="btn btn-success btn-edit btn-xs"><i class="fa fa-pencil"></i> 编辑</a>
                <a url="{:admin_url('admin/tv/del' , array('id' => $vo['tv_id']))}" class="confirm btn btn-danger btn-xs confirm ajax-get"><i class="fa fa-trash-o"></i> 删除</a>
               </td>             
            </tr>
 {/volist}   
                  {else/}
                  <tr>
                    <td style="text-align:center;vertical-align: middle;" colspan="11" >抱歉，没有找到相关内容！</td>
                  </tr>
                  {/notempty}
                  </tbody>
 </table>
              </form>
            </div>
            {gt name="list->lastPage()" value="1"}
            <div class="fixed-table-pagination" style="overflow:hidden">
              <div class="pull-left pagination-detail"><span class="pagination-info">共{$list->total()}条数据 {$list->currentPage()}/{$list->lastPage()} </span><span class="page-list">每页显示 {$list->listRows()} 条数据</span></div>
              <div class="pull-right pagination">
                <ul class="pagination">
                  {$page}
                </ul>
              </div>
            </div>
            {/gt}
          </div>
        </div>
        <div class="clearfix"></div>
      </div>
    </div>
  </div>
</div>
</div>
